<!--conf
<sample>
              <product version="1.4" edition="pro"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Row hovering</title>
</head>
<style>
    .grid_hover {
        background-color:#7FFFD4;
        font-size:20px;
    }
</style>
<body>
<link rel='STYLESHEET' type='text/css' href='../common/style.css'>
<table cellspacing="0" cellpadding="0" class="sample_header" border="0">
	<tr valign="middle">
		<!-- COMPONENT ICON -->
		<td width="40" align="center"><img src="../common/dhtmlxgrid_icon.gif" border="0"></td>
		<!-- COMPONENT NAME -->
		<td width="150" align="left" nowrap="true">Sample: dhtmlxGrid</td>
		<!-- SAMPLE TITLE -->
		<td width="0" align="left" nowrap><b>Row hovering</b></td>
		<!-- LINK TO COMPONENT PAGE -->
		<td width="0" align="right"><a href="http://www.dhtmlx.com/docs/products/dhtmlxGrid/index.shtml">dhtmlxGrid main page</a></td>
		<!-- CLOSE BUTTON -->
		<td width="50"><div class="sample_close"><a href="javascript:void(0);" onclick="self.close();"><img src="../common/sample_close.gif" width="14" height="14" border="0" alt="X"></a></div></td>
	</tr>
</table>
	
	
	<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxgrid.css">
	<script  src="../../codebase/dhtmlxcommon.js"></script>
	<script  src="../../codebase/dhtmlxgrid.js"></script>		
	<script  src="../../codebase/dhtmlxgridcell.js"></script>
   	
	<table width="600">
		<tr>
			<td width="50%" valign="top">
				<div id="gridbox" width="100%" height="250px" style="background-color:white;"></div>
			</td>

		</tr>
		<tr>
			<td>
				<a href="#" onclick="mygrid.enableRowsHover(true,'grid_hover')">enable hovering</a><br>
				<a href="#" onclick="mygrid.enableRowsHover(false)">disable hovering</a><br>
                <div id="a_1"></div>
			</td>
		</tr>
	</table>
<br>
<div class='sample_code'><div class="hl-main"><pre><span class="hl-code"> 
&lt;</span><span class="hl-identifier">style</span><span class="hl-code">&gt;
    .</span><span class="hl-identifier">grid_hover</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
        </span><span class="hl-identifier">background</span><span class="hl-code">-</span><span class="hl-identifier">color</span><span class="hl-code">:#</span><span class="hl-number">7</span><span class="hl-identifier">FFFD4</span><span class="hl-code">;
        </span><span class="hl-identifier">font</span><span class="hl-code">-</span><span class="hl-identifier">size</span><span class="hl-code">:</span><span class="hl-number">20</span><span class="hl-identifier">px</span><span class="hl-code">;
    </span><span class="hl-brackets">}</span><span class="hl-code">
&lt;/</span><span class="hl-identifier">style</span><span class="hl-code">&gt;
...
    </span><span class="hl-identifier">mygrid</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXGridObject</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">gridbox</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
    </span><span class="hl-identifier">mygrid</span><span class="hl-code">.</span><span class="hl-identifier">enableRowsHover</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">grid_hover</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span></pre></div></div>

<script>
    function m_f2(id){
        document.getElementById("a_1").innerHTML="Selected row: "+id;
    }
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../codebase/imgs/");
	mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
	mygrid.setInitWidths("50,150,120,80,80,80,80,200")
	mygrid.setColAlign("right,left,left,right,center,left,center,center")
	mygrid.setColTypes("dyn,ed,ed,price,ch,co,ra,ro");
      mygrid.attachEvent("onRowSelect",m_f2);
    mygrid.getCombo(5).put(2,2);
	mygrid.setColSorting("int,str,str,int,str,str,str,date")
    mygrid.enableMultiselect(true);
	mygrid.init();
	mygrid.setSkin("modern")
	mygrid.loadXML("grid.xml");

</script>

<!-- FOOTER -->
<table callspacing="0" cellpadding="0" border="0" class="sample_footer"><tr><td style="padding-left: 8px;">&copy; <a href="http://www.dhtmlx.com">DHTMLX LTD</a>. All rights reserved</td></tr></table>
<!-- FOOTER -->

</body>
</html>
